.class public Lcom/bitauto/autoeasy/selectcar/MapActivity;
.super Lcom/bitauto/autoeasy/BaseActivity;
.source "MapActivity.java"


# static fields
.field private static TAG:Ljava/lang/String;


# instance fields
.field private final MapUrl:Ljava/lang/String;

.field private url:Ljava/lang/String;

.field private webView:Landroid/webkit/WebView;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 24
    const-string v0, "MapActivity"

    sput-object v0, Lcom/bitauto/autoeasy/selectcar/MapActivity;->TAG:Ljava/lang/String;

    .line 17
    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .prologue
    .line 17
    invoke-direct {p0}, Lcom/bitauto/autoeasy/BaseActivity;-><init>()V

    .line 22
    const-string v0, "http://ditu.google.cn/maps?hl=zh&mrt=loc&q="

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/MapActivity;->MapUrl:Ljava/lang/String;

    .line 17
    return-void
.end method


# virtual methods
.method public finish()V
    .locals 1

    .prologue
    .line 70
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/MapActivity;->webView:Landroid/webkit/WebView;

    invoke-virtual {v0}, Landroid/webkit/WebView;->clearHistory()V

    .line 71
    invoke-super {p0}, Lcom/bitauto/autoeasy/BaseActivity;->finish()V

    .line 72
    return-void
.end method

.method public initView()V
    .locals 5

    .prologue
    .line 35
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/MapActivity;->getIntent()Landroid/content/Intent;

    move-result-object v3

    const-string v4, "Lat"

    invoke-virtual {v3, v4}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 36
    .local v0, Lat:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/MapActivity;->getIntent()Landroid/content/Intent;

    move-result-object v3

    const-string v4, "Lng"

    invoke-virtual {v3, v4}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 37
    .local v1, Lng:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/MapActivity;->getIntent()Landroid/content/Intent;

    move-result-object v3

    const-string v4, "title"

    invoke-virtual {v3, v4}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 39
    .local v2, title:Ljava/lang/String;
    invoke-virtual {p0, v2}, Lcom/bitauto/autoeasy/selectcar/MapActivity;->setTitleContent(Ljava/lang/String;)V

    .line 40
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "http://ditu.google.cn/maps?hl=zh&mrt=loc&q="

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ","

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    iput-object v3, p0, Lcom/bitauto/autoeasy/selectcar/MapActivity;->url:Ljava/lang/String;

    .line 47
    const v3, 0x7f0b01b7

    invoke-virtual {p0, v3}, Lcom/bitauto/autoeasy/selectcar/MapActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/webkit/WebView;

    iput-object v3, p0, Lcom/bitauto/autoeasy/selectcar/MapActivity;->webView:Landroid/webkit/WebView;

    .line 48
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1
    .parameter "savedInstanceState"

    .prologue
    .line 27
    invoke-super {p0, p1}, Lcom/bitauto/autoeasy/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    .line 29
    const v0, 0x7f03002d

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/MapActivity;->setTitle(I)V

    .line 30
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/MapActivity;->initView()V

    .line 31
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/MapActivity;->refreshView()V

    .line 32
    return-void
.end method

.method public refreshView()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 52
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/MapActivity;->webView:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v0

    .line 53
    .local v0, ws:Landroid/webkit/WebSettings;
    invoke-virtual {v0, v2}, Landroid/webkit/WebSettings;->setAllowFileAccess(Z)V

    .line 54
    invoke-virtual {v0, v2}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    .line 55
    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/webkit/WebSettings;->setBuiltInZoomControls(Z)V

    .line 56
    const-string v1, "utf-8"

    invoke-virtual {v0, v1}, Landroid/webkit/WebSettings;->setDefaultTextEncodingName(Ljava/lang/String;)V

    .line 58
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/MapActivity;->webView:Landroid/webkit/WebView;

    new-instance v2, Lcom/bitauto/autoeasy/selectcar/MapActivity$1;

    invoke-direct {v2, p0}, Lcom/bitauto/autoeasy/selectcar/MapActivity$1;-><init>(Lcom/bitauto/autoeasy/selectcar/MapActivity;)V

    invoke-virtual {v1, v2}, Landroid/webkit/WebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 64
    sget-object v1, Lcom/bitauto/autoeasy/selectcar/MapActivity;->TAG:Ljava/lang/String;

    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/MapActivity;->url:Ljava/lang/String;

    invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 65
    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/MapActivity;->webView:Landroid/webkit/WebView;

    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/MapActivity;->url:Ljava/lang/String;

    invoke-virtual {v1, v2}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    .line 66
    return-void
.end method
